import socket
# 创建套接字
u_server=socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
# 绑定地址
server_address=('192.168.0.101',8803)
u_server.bind(server_address)

# 循环收发消息
while True:
    data,addr = u_server.recvfrom(1024)
    print("client-->server:"+data.decode('utf-8'))
    u_server.sendto('welcome to My page'.encode(),addr)
# 关闭套接字
# u_server.close()